<div class="post">
	<h2>
		<?php echo CHtml::link(CHtml::encode($data->title), $data->url); ?>
	</h2>
	<h6>
		posted by <?php echo $data->author->username . ' on ' . $data->create_time; ?>
	</h6>
	
	<div id="pic">	
		<ul class="thumbnails">
	        <li class="span6">
	        	<?php     
	        	    if($data->photo != ""){ 
						$data->photo=Yii::app()->request->baseUrl.$data->photo;
				    	echo "<img style='height: 270px;' src='".$data->photo."'>";
				   }
				?>
		    </li>
	    </ul>
	</div>		
		
	<div class="jumbotron">
			<?php
				$this->beginWidget('CMarkdown', array('purifyOutput'=>true));
				echo $data->content;
				$this->endWidget();
			?>
	</div>
	
	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
	<!-- in_post -->
	<ins class="adsbygoogle"
	     style="display:inline-block;width:468px;height:60px"
	     data-ad-client="ca-pub-2994496310301170"
	     data-ad-slot="2029127247"></ins>
	<script>
	(adsbygoogle = window.adsbygoogle || []).push({});
	</script>
	<div class="nav">
		<b>Tags:</b>
		<?php echo implode(', ', $data->tagLinks); ?>
		<br/>
		
		<a href="/index.php/post/update?id=<?php echo $data->id?>"><?php if (!Yii::app()->user->isGuest) echo Edit ?></a>
		<?php //echo CHtml::link('Permalink', $data->url); ?> 
		<?php echo CHtml::link("Comments ({$data->commentCount})",$data->url.'#comments'); ?> |
		Last updated on <?php echo $data->update_time; ?>
	</div>
</div>
